package org.hzz.promotions.types.enums.code;

import io.gitee.pkmer.convention.enums.BaseEnum;
import io.gitee.pkmer.convention.enums.BaseEnumTemplate;
import lombok.Getter;

/**
 * @author <a href="mailto:1193094618@qq.com">pkmer</a>
 * <br>
 * <a href = "https://gitee.com/developeros/videos-online">Code Repository</a>
 * At 2024/8/31
 * 兑换类型
 */
@Getter
public enum CodeType implements BaseEnum<Integer> {
    // 以后再添加其它类型
    COUPON(1,"优惠券");

    private final Integer value;
    private final String desc;

    CodeType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static CodeType fromValue(Byte value) {
        return BaseEnumTemplate.fromByteValue(CodeType.class, value);
    }
}
